Fireworks Article

Working with and Creating Textures in Fireworks

Richard Blenkinsopp

Fireworks textures are grayscale bitmaps; when you apply them, you affect the lightness of vector objects. You can use textures with any Fill type. Fireworks comes with many textures, and you can create you own as well. To apply a texture to an object, select the object and choose the texture from the Texture pop-up menu in the Property inspector.

Creating your own texture is as easy as saving an image in any Fireworks-supported format. Making it work for you, however, often requires more planning. Specific things that require attention are:

  • How will the texture affect the coloring, or more specifically, the lightness of the object it is applied to?
  • How will the texture tile between repetitions?

I will cover these questions, and then you’ll learn how to create a texture and import it into Fireworks for use in your future projects.

Requirements

Macromedia Fireworks


Tutorials and sample files:


How Applying Textures Affects Objects

The first question you need to ask when working with textures is how will the texture affect the coloring or the lightness of the object it is applied to? Fireworks textures work in a similar way as grayscale masks. Objects with textures applied retain their fill characteristics, but lighten in areas that appear as dark shades on the source texture. If you check the transparent option on the object's properties bar, black areas on the source texture become transparent, while white areas retain their original color.

If this sounds a little confusing, maybe some samples will help. First, here's the source object in Figure 1 below.

The source object before the texture has been applied

Figure 1. The source object before the texture has been applied

In Figure 2 is the source texture, a checkerboard pattern, with black squares on the top left and the bottom right. It has white squares on the top right and the bottom left.

The checkered texture

Figure 2. The checkered texture

Figure 3 shows the source object with the checkered texture applied.

The source object with the checkered texture applied to it

Figure 3. The source object with the checkered texture applied to it

The areas on the source object covered by white squares are unaffected, while the areas covered by black squares become white.

Now, set a green background and check the Transparent box. The areas covered by white squares are still unaffected, and the areas covered by black squares become transparent as shown in figure 4 below.

The source object with a green background and the checkered texture applied to it

Figure 4. The source object with a green background and the checkered texture applied to it

Since textures only lighten an object, they have no effect on white objects. The lighter the fill color of the source object, the less effect the texture will have. The exception to this rule is when you apply a texture to a white object with a nonwhite background and select the transparent option.

How Textures Tile Between Repetitions

The next thing to consider when working with textures is how the texture will tile between repetitions. This is where you separate simple textures from complex ones! Textures without overlapping elements are simple to create. With these, you don't have to think about lining up elements to ensure smooth transition between tiles. Here is an example of this simple type of texture applied to a dark gray object.

 A simple texture applied to a dark gray object. (this has been reduced in size to make the most of space)

Figure 5. A simple texture applied to a dark gray object (reduced in size to make the most of space)

The actual texture is shown below in Figure 6. It consists of a gray dot on a plain white background. As long as you create the texture pattern within the boundary of the graphic itself, you don't need to line up the texture to ensure smooth, seamless tiling.

A simple texture before it has been applied to an object.

Figure 6. A simple texture before it has been applied to an object

Neat and simple pattern textures are easy to create, but what about complex or seemingly random patterns? For these to look as intended, you need to line up each edge (top, bottom, left, right) so that there is no visible join. This takes some practice and planning.

The next example (Figure 7) shows an object with a tiled texture applied.

An object with a tiled texture applied

Figure 7. An object with a tiled texture applied

This is a continuous texture, and you shouldn't be able to see where it starts or ends. Unfortunately, if the texture doesn't line up—even by a single pixel—you’ll be able to see a seam where the texture starts and ends. See figure 8 for an example.

A texture that doesn’t line up perfectly when repeated.

Figure 8. A texture that doesn't line up perfectly when repeated

Lining up is a matter of planning and design. Seemingly random texture patterns actually aren't random at all. I build mine using Fireworks rulers and guides and plan the repetition with mathematical accuracy for simplicity and effect.

Creating a Texture

Setting Up the Source Object

Here's how to line up a texture, using a bubbles texture as an example. The bubbles texture is obviously a repeating pattern (see Figures 11 and 12 below), but it’s not so obvious where the pattern starts and ends, and this is your goal.

  1. Download and unzip the sample files that are linked at the beginning of this article. Then import the bubble.stl style from the sample files into Fireworks. Follow these steps to import the bubble style in Fireworks.

    1. Open Fireworks and select the Styles panel. You can find the Styles panel by choosing Window > Styles, if it is not already visible.
    2. Click the options icon in the top right corner of the Styles panel and choose Import Styles.
    3. Select the Style files you downloaded and extracted and click OK to import them.
  2. Create a new file (File > New) with an oversized canvas size with a width of 400 pixels and a height of 300 pixels. Texture files are normally small files with small dimensions, but planning them on an oversized canvas gives you room to see how the pattern is unfolding.
  3. Using the rectangle tool, draw a square that is 48 X 48 pixels. You can first draw the square and then resize it in the Property inspector.
  4. Within the Property inspector, adjust the position of the square. Set the X coordinate to 40 and the Y coordinate to 0.
  5. Select the square and apply the bubble style to it. To do this, open the Styles panel (Window > Styles) and click the bubble style.

    Note: For information on styles, see my two styles articles, Fireworks MX 2004 Styles Sample Files and Creating Styles in Fireworks.) You object should now look similar to Figure 9 below. However, the pattern will be slightly different. If you have problems with the above steps or you want your file to look identical to the screen shot, you can use the source.png file that is available in the sample files linked at the beginning of this article.

  6. Save your work using a filename of your choice.
  7. Close the file and open the source.png file.

    Note: The above steps are crucial to understanding how to create textures, however, the file you created is slightly different from the screen shots in this article. You may become frustrated with the differences, so I recommend using the source.png file as a starting point for the remainder of the article.

In this example, you are using a simple square as a source with one of my bubble styles applied. This is a simple way to get the look of an almost-random pattern. For your other projects, you may prefer to simply use a group of objects or even bitmaps.

A simple square with the bubble texture applied

Figure 9. A simple square with the bubble texture applied

Cloning the Object

Now you will create several identical copies, or clones, of the object and place them next to each other.

  1. Select the object, and select Edit > Clone.
  2. Move it horizontally using the right arrow key.
  3. Repeat step 2 two more times.
  4. Move the objects horizontally using the arrow keys so that they overlap in a way that looks natural (spacing depends on the actual texture). Your objects should look similar to figure 10 below. Again, if you want your file to look exactly like figure 10, use the source.png file as a starting point for cloning the object.

In more complex textures where you are using several objects as your source pattern, you may wish to group them (Shift-select them, and then select Modify > Group) to make moving them easier.

The square object with the bubble style cloned and repeated horizontally.

Figure 10. The square object with the bubble style cloned and repeated horizontally

Next you will clone the group of objects so they repeat vertically.

  1. Select all objects (Select > Select All).
  2. Clone (Edit > Clone) and move the objects vertically downwards using the downward arrow key.
  3. Repeat step 2 two more times with the repetitions equally spaced so that the image looks natural as shown in Figure 11 below.
The object cloned vertically and horizontally

Figure 11. The object cloned vertically and horizontally

If you're wondering why you have repeated the texture, here's the answer. The ultimate aim is to crop the document so that it creates an overlapped tile that is seamless. You will need at least three by three tiles to do this to ensure the start and end of the previous and next tiles appear within the boundary of a single tile. Depending on how closely the texture objects repeat, you may need more repetitions to show the entire texture within a single tile.

Inverting the Color

Remember that textures only lighten an object, and also that dark areas of the texture become light areas. If you want the texture to have the same effect as it does above, you need to invert all the colors. Use the following steps to do this.

The finished texture before the color has been inverted

Figure 12. The finished texture before the color has been inverted

  1. Choose Select > Select All to group all the objects. The point of grouping all objects is to avoid Fireworks replacing any live effects already being used on different objects. In the this example, you are only using a single object, so this wouldn't happen, but if you use multiple objects with different effects, this becomes an issue. It’s a good habit to get into.
  2. Apply the Invert Live Effect by clicking the Effects Plus (+) button in the Property inspector and select Adjust Color > Invert. It should now look like Figure 13 below (without the slice). If the color is not inverted, ensure that the object was selected before applying the Invert effect.

Preparing the Finished Texture for Export

There are two ways to prepare and export the finished texture. You can crop it, or you can slice it and export the sliced image. I will review both methods.

As shown in Figure 13 below, use the slice tool to slice a single tile, or use the crop tool to crop it. The objective here is to size and position the slice so that it repeats seamlessly as I described earlier. You need to line up elements to ensure smooth transition between tiles. This is the tricky part, and you will probably need to try it several times to get it right. This is where your old friend the Undo command comes in handy (ctrl > Z or Edit > Undo). You can make fine modifications using the numeric width and height fields in the Property inspector.

That may seem difficult, but it is relatively easy to find the appropriate area to slice or crop in this example because the source shape was a simple square (the stroke provided the interest). Depending on the complexity of your work, finding the exact position of a tile may be more difficult. Try to find an identifying point on the tile that marks the edge of each repetition. Again, this will take some practice, and I suggest trying several straightforward examples before moving on to anything too difficult.

The ending texture sliced and ready to export

Figure 13. The ending texture sliced and ready to export

The texture is now ready to export.

Exporting the Texture

Cropping Method: If you used cropping method to export the texture, select File > Export Preview and choose the most suitable Fireworks-compatible format (PNG, JPG, GIF, BMP, etc.) and click the Export button. When you export, you can, if you wish, resize your output by adjusting the size of your object in the File tab of the Export Preview dialog box. For this example, leave the file size as is. Changing the file size is an advantage of the cropping method that the slicing method doesn't offer.

Slicing Method: If you used the slicing method to prepare the texture for export, use these steps to export the slice.

  1. Select File > Export.
  2. When the Export dialog box appears:

    1. Name the file with a name of your choosing.
    2. Check the Selected slices only checkbox.
    3. Unselect the Include areas without slices checkbox.
    4. Click the Save button.
The texture after it’s been cropped and exported

Figure 14. The texture after it’s been cropped and exported

Where you export your texture to depends on whether you are intending to use it on a single project, or whether you expect to use it regularly. For single project usage, it's best to save the source file and export the texture to the directory where you are storing all the images for that project. When you need to call the texture, you can choose Other from the texture pop-up menu in the Property inspector and point to your file. (Other is the last option in the list of textures.)

If you want to load the texture every time Fireworks loads, store it in the directory used by the standard Fireworks textures. This directory location depends on your operating system. On Windows platforms, this is C:\\Program Files\Macromedia\Fireworks MX 2004\Configuration\Textures. On Macintosh, this is HardDrive | Applications | Macromedia Fireworks MX 2004 | Configuration | Textures.

You will need to exit and re-launch Fireworks for the texture to be available.

Note: The sample files linked from the beginning of this article also include some other textures I created that you can play around with.

Applying the Texture to an Object

Use the following steps to apply the texture to an object:

  1. Ensure you have exited and restarted Fireworks so that the new texture shows up in the texture pop-up menu.
  2. Open a new file in Fireworks (File > New) with a canvas size of 700 x 500 pixels.
  3. Select the rectangle tool, change the fill to dark blue, and draw a square that fills the majority of the canvas.
  4. Select the square you just drew and select the bubble texture you just created in the Texture pop-up menu in the Property inspector.

Repeat these steps with objects of various colors to experiment. If you notice that the tiles are not lining up, refer to the steps and advice in the Preparing the Finished Texture for Export section above.

That concludes this article on working with textures; I hope you have enjoyed it! If you haven't already done so and are interested in learning about working with styles in Fireworks, check out my other Developer Center articles, Fireworks MX 2004 Styles Sample Files and Creating Styles in Fireworks.


About the author

Richard Blenkinsopp has been a Fireworks enthusiast since 1998 when version 2 was released. He works at the Memorial University of Newfoundland where his job includes designing and maintaining the School of Music website. Artistically challenged as a child, Richard has found Fireworks to be the perfect solution for creating complex graphics and concepts without the need to be able to draw.

Richard lives in Newfoundland, Canada with his wife Kelly. He enjoys taking scenic photographs and playing the trumpet in local funk and jazz groups.